package com.example.his.api.mis.controller.form.role;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;

@Data
public class UpdateRoleByIdForm {
  
  @NotNull(message = "id不能为空")
  @Min(value = 0, message = "id不能小于0")
  private Integer id;
  
  @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,10}$", message = "roleName格式错误")
  private String roleName;
  
  private ArrayList <Number> permissions;
  
  private ArrayList <Number> defaultPermissions;
  
  @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{2,10}$", message = "desc格式错误")
  private String desc;
  
  @Range(min = 0, max = 1, message = "systemic格式错误")
  private Integer systemic;
}
